#!/bin/bash

SCALA_VERSION=2.12.8 ALMOND_VERSION=0.5.0


echo Install almond

./coursier bootstrap -f \
    -r jitpack \
    -i user -I user:sh.almond:scala-kernel-api_$SCALA_VERSION:$ALMOND_VERSION \
    sh.almond:scala-kernel_$SCALA_VERSION:$ALMOND_VERSION \
    --sources --default=true \
    -o almond


# export PATH="$PATH:/home/z/.local/share/coursier/bin"
./coursier install scalac

./almond --install


#echo Install required Jupyter/JupyterLab extensions
#jupyter labextension install @jupyterlab/plotly-extension


echo install proxy
# pip3 install jupyter-server-proxy
# mkdir -p  ~/.jupyter
# cp  ~/source/jupyter_server_config.py   ~/.jupyter
jupyter labextension install @jupyterhub/jupyter-server-proxy


echo install  starters
jupyter labextension install @jupyterhub/starters



echo install jupyterlab zh_cn
pip3 install jupyterlab-language-pack-zh-CN
# mkdir -p  ~/.jupyter/lab/user-settings/\@jupyterlab/translation-extension
# cp  ~/source/plugin.jupyterlab-settings   ~/.jupyter/lab/user-settings/\@jupyterlab/translation-extension/plugin.jupyterlab-settings

# echo Install custom Javascript for solutions
# mkdir -p ~/.jupyter/custom
# cp source/custom.js ~/.jupyter/custom/custom.js


# echo install  SpinalHDL lib
# jupyter-execute --kernel_name=Scala   install_spinalhdl.ipynb

